<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<input class="ss" type="text">

<body>
    <script>
        //节流
        function throttle(fn, delay) {
            let timer;
            return function (...args) {
                if (timer) return;
                timer = setTimeout(() => {
                    fn.call(this, ...args)
                    timer = null;
                }, delay);
            }
        }

    </script>
</body>

</html>